<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/4/14
 * Time: 16:14
 */
set_include_path(dirname(dirname(__FILE__)));
include_once("inc/init.php");
include 'function.php';
session_start();
global $db, $smarty;
$userid = $_GET['userid'];
$url = "http://dingwei.famishare.me/panel.php?userid=$userid";
$code = getCode($url);
$access_token = getOpenId($code);
$userInfo = getUserInfo($access_token);
$smarty->assign('userid', $userid);
$smarty->assign('userInfo', $userInfo);
$smarty->assign('signPackage', getSignPackage());
$smarty->display('panel.htm');